<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <div id="app">
      <com-a>
          <div slot='header'>我来组成头部</div>
          <div slot='main'>我来组成身体</div>
          <div slot='footer'>我来组成腿部</div>
      </com-a>
  </div>
<template id="tmp">
    <div class="container">
        <header>
            <slot name='header'></slot>
        </header>

        <main>
            <slot name='main'></slot>
        </main>

        <footer>
            <slot name='footer'></slot>
        </footer>
    </div>
</template>

  <script src="./vue.js"></script>
  <script>
      Vue.component('comA',{
          template:"#tmp"
      })

    var vm = new Vue({
      el:'#app',
      data:{
      },
      methods:{
      }
     });
  </script>
</body>
</html>
